package com.example.demo2.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.sql.Timestamp;
import java.util.List;

@Data
@TableName("sys_comment")
public class Comment {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    private String content;
    private String username;
    private Integer userId;
    private double rate;
    private Integer foreignId;
    private Integer pid;
    private String target;
    @TableField(value = "createtime")
    private Timestamp createTime;

    @TableField(exist = false)
    private List<Comment> children;
}
